<form action="#" class="form-horizontal" data-ng-controller="datepickerCtrl">

    <div class="form-body">
        <div class="form-group">
            <label class="col-md-3 control-label">默认日期{{date1}}</label>

            <div class="col-md-4">
                <input type="text" class="form-control" ed-date-picker ng-model="date1"/>
            </div>
            <div class="col-md-3">
                <button type="button" class="btn green" ng-click="date1='2016-10-01'"><i class="fa fa-save"></i> 赋值</button>
            </div>
        </div>
    </div>

    <div class="form-body">
        <div class="form-group">
            <label class="col-md-3 control-label">自定义格式日期{{date2}}</label>

            <div class="col-md-4">
                <input type="text" class="form-control" ed-date-picker ed-date-format="yyyy/mm/dd" ng-model="date2"/>
            </div>
            <div class="col-md-3">
                <button type="button" class="btn green" ng-click="date2='2016-10-01'"><i class="fa fa-save"></i> 赋值</button>
            </div>
        </div>
    </div>

    <hr/>

    <div class="form-body">
        <div class="form-group">
            <label class="col-md-3 control-label">年月{{date3}}</label>

            <div class="col-md-4">
                <input type="text" class="form-control" ed-month-picker ng-model="date3"/>
            </div>
        </div>
    </div>

    <hr/>

    <div class="form-body">
        <div class="form-group">
            <label class="col-md-3 control-label">默认时间{{time1}}</label>

            <div class="col-md-4">
                <input type="text" class="form-control" ed-time-picker ng-model="time1"/>
            </div>
        </div>
    </div>

    <div class="form-body">
        <div class="form-group">
            <label class="col-md-3 control-label">自定义格式时间{{time2}}</label>

            <div class="col-md-4">
                <input type="text" class="form-control" ed-time-picker ed-date-format="yyyy-mm-dd hh" ng-model="time2"/>
            </div>
        </div>
    </div>

    <div class="form-body">
        <div class="form-group">
            <label class="col-md-3 control-label">自定义格式时间{{time3}}</label>

            <div class="col-md-4">
                <input type="text" class="form-control" ed-time-picker ed-date-format="hh:ii" ng-model="time3"/>
            </div>
            <div class="col-md-3">
                <button type="button" class="btn green" ng-click="time3='10:30'"><i class="fa fa-save"></i> 赋值</button>
            </div>
        </div>
    </div>

    <hr/>

    <div class="form-body">
        <div class="form-group">
            <label class="col-md-3 control-label">月日{{time}}</label>

            <div class="col-md-4">
                <input type="text" class="form-control datepicker" ng-model="time"/>
            </div>
        </div>
    </div>

    <hr/>

    <div class="form-body">
        <div class="form-group">
            <label class="col-md-3 control-label">弹出框里使用</label>

            <div class="col-md-8">
                <button type="button" class="btn green" ng-click="modal.show()"><i class="fa fa-save"></i> 弹出</button>
                <div ed-modal="modal" data-options="title: '弹出框日期选择', icon: 'fa-plus', width: 760">
                    <div class="form-horizontal">
                        <div class="form-body">
                            <div class="form-group">
                                <label class="col-md-3 control-label">默认日期{{date5}}</label>

                                <div class="col-md-4">
                                    <input type="text" class="form-control" ed-date-picker ng-model="date5"/>
                                </div>
                            </div>
                        </div>
                        <div class="form-body">
                            <div class="form-group">
                                <label class="col-md-3 control-label">默认时间{{time5}}</label>

                                <div class="col-md-4">
                                    <input type="text" class="form-control" ed-time-picker ng-model="time5"/>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</form>

<script>

    function datepickerCtrl($scope, Page) {

        $(".datepicker").datepicker({
            format : 'mm-dd',
            language: 'zh-CN',
            orientation: "top",
            autoclose: true
        }).on('show', function() {
            // remove the year from the date title before the datepicker show
            var dateText  = $(".datepicker-days .datepicker-switch").text().split(" ");
            var dateTitle = dateText[0];
            $(".datepicker-days .datepicker-switch").text(dateTitle);
            $(".datepicker-months .datepicker-switch").css({"visibility":"hidden"});
        });
    }

</script>